home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / html / vendors / adobe / software / Removepho2.csh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1997-06-17  |  2KB  |  87 lines

  1. #! /bin/csh -f
  2. #
  3. set DFTTOPDIR=/usr/adobe/Photoshop_3.0.1
  4. set PNAME=Photoshop_3.0.1
  5.  
  6. umask 022
  7.  
  8. # Abort installation if user not superuser
  9. if (`whoami` != root) then
  10.     echo
  11.     echo "You must be logged in as root to install $PNAME."
  12.     echo "Type su and enter the password to become root."
  13.     goto ABORT
  14. endif
  15.  
  16. BEGIN_SCRIPT:
  17. /usr/bsd/clear
  18.  
  19. REMOVEAI:
  20. echo
  21. echo "*** Remove an installation of $PNAME ***"
  22.  
  23. echo ""
  24. echo "Enter the Installation directory into which you"
  25. echo "installed Adobe Photoshop"
  26. echo -n "[press Enter for /usr/adobe]: "
  27. set A = $<
  28. if ( "$A" == ""  ) then
  29.     set TOPDIR="$DFTTOPDIR"
  30.     set OTHERDIR=/usr/adobe
  31. else
  32.     set TOPDIR="${A}/Photoshop_3.0.1"
  33.     set OTHERDIR="${A}"
  34. endif
  35.  
  36. # Check if installation directory exists
  37. if ( ! -e $TOPDIR ) then
  38.     echo
  39.     echo "$TOPDIR does not exist."
  40.     goto ABORT
  41. endif
  42.  
  43. echo
  44. echo -n "Removing $TOPDIR ..."
  45. /bin/rm -rf $TOPDIR 
  46. if ( "$TOPDIR" == "$DFTTOPDIR") then
  47.     rmdir /usr/adobe
  48. endif
  49. echo "done"
  50. if ( -d "$OTHERDIR/DPSNXBasic_2.1.1" ) then
  51. echo -n "Remove directory $OTHERDIR/DPSNXBasic_2.1.1 (y/n)? \c"
  52.     set ans=($<)
  53.         if ( $ans != 'y' ) then
  54.     else
  55.     /bin/rm -rf $OTHERDIR/DPSNXBasic_2.1.1
  56.     echo done.
  57.     endif
  58. endif
  59.     if ( -e $OTHERDIR/PPD ) then
  60.     echo -n "Remove directory $OTHERDIR/PPD (y/n)? \c"
  61.     set ans=($<)
  62.         if ( $ans != 'y' ) then
  63.         else
  64.         /bin/rm -rf $OTHERDIR/PPD
  65.     echo done.
  66.     endif
  67. endif
  68. if ( -l /usr/bin/photoshop ) then
  69. echo -n "Remove link /usr/bin/photoshop (y/n)? \c"
  70. set ans=($<)
  71.         if ( $ans != 'y' ) then
  72.             echo " "
  73.                 echo " "
  74.                 echo "... Bye."
  75.                 sleep 3
  76.                 exit
  77.     else
  78.     /bin/rm -f /usr/bin/photoshop
  79.     endif
  80. endif
  81. echo "done"
  82. sleep 10
  83. exit 0
  84.  
  85. ABORT:
  86. exit 1
  87.